function displayMsg(msg)
{
	displayAlert(screen.width/3,screen.height/3,msg);
}

function displayAlert(left,top,msg)
{
	document.getElementById("alertMessage").innerText=msg;
	document.getElementById("alertBox").style.left=left+"px";
	document.getElementById("alertBox").style.top=top+"px";
	document.getElementById("alertBox").style.display="block";
	document.getElementById("btn_alertBox").focus();
}

function getUrlVars()
{
	var vars = {};
	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, 
															
function(m,key,value)
{
	vars[key] = value;
	});
	return vars;
}

function validarAgregarAnuncio(form)
{
	with(form)
	{
		if (titulo_anu.value.length<1)
		{
			titulo_anu.focus();
			document.getElementById("error_message").style.visibility="visible";
			return false;
		}
		if (texto_anu.value.length<1)
		{
			texto_anu.focus();
			document.getElementById("error_message").style.visibility="visible";
			return false;
		}
	}
	document.getElementById("error_message").style.visibility="hidden";
}

function ocultardiv(id)
{
	document.getElementById(id).style.display="none";
}

function mostrardiv(id)
{
	document.getElementById(id).style.display="visible";
}
